package comwork.example.halou.dog_live_tvt.constants;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 * Created by halou on 2016/11/22.
 */
public class UrlPath {

    //首页--->
    public static  String  homeUrl="http://zhibo.sogou.com/getAppIndexData?type=json&dataType=0&pageNo2=1&pageSize2=6&pageNo3=1&pageSize3=100&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d";

    //更多 我的关注
    public static  String  myConcernUrl="http://zhibo.sogou.com/getMyConcernAndRecData?appid=947a0b53bb7304584fb49c96e3321264aed5ac9d&type=json";

    //更多 主播排行
    //http://zhibo.sogou.com/livesearch?query=%E8%8B%B1%E9%9B%84%E8%81%94%E7%9B%9F&sp=videohome%3A0%3BpageNo%3A1%3Bgamename%3A%3Bonline%3A0%3B&req_from=app&resulttype=json&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d
    //%E5%BD%B1%E8%A7%86%E7%9B%B4%E6%92%AD

    public static String getLiveSearchUrl(String name){
        try {
            name= URLEncoder.encode(name,"utf-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }

        return "http://zhibo.sogou.com/livesearch?query="+name+"&sp=videohome%3A0%3BpageNo%3A1%3Bgamename%3A%3Bonline%3A0%3B&req_from=app&resulttype=json&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d";
    }




    //栏目分类--->

    public static  String  typerUrl="http://zhibo.sogou.com/gamelivedata?pageNo=1&pageSize=100&type=json&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d";

    //二级  直播
    //http://zhibo.sogou.com/livesearch?query=%E8%8B%B1%E9%9B%84%E8%81%94%E7%9B%9F&sp=gamename%3A%E8%8B%B1%E9%9B%84%E8%81%94%E7%9B%9F%3BpageNo%3A1%3BpageSize%3A100%3B&req_from=app&resulttype=json&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d
    public static  String   getTypeLiveUrl(String name){
        try {
            name= URLEncoder.encode(name,"utf-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }

        return "http://zhibo.sogou.com/livesearch?query="+name+"&sp=gamename%3A"+name+"%3BpageNo%3A1%3BpageSize%3A100%3B&req_from=app&resulttype=json&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d";
    }

    //二级 视频
    //http://zhibo.sogou.com/searchgame?query=%E5%BD%B1%E8%A7%86%E7%9B%B4%E6%92%AD&requesttype=all&f=0&product=video_search&sp=jsid%3A0%3Bgamename%3A%E5%BD%B1%E8%A7%86%E7%9B%B4%E6%92%AD%3BpageNo%3A1%3BpageSize%3A100%3B&req_from=app&resulttype=json&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d

    public static  String  getTypeSearchUrl(String name){
        try {
            name= URLEncoder.encode(name,"utf-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return "http://zhibo.sogou.com/searchgame?query="+name+"&requesttype=all&f=0&product=video_search&sp=jsid%3A0%3Bgamename%3A"+name+"%3BpageNo%3A1%3BpageSize%3A100%3B&req_from=app&resulttype=json&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d";
    }

    //视频搜索
    //http://zhibo.sogou.com/getAppSearchData?type=json&query=%E8%8B%B1%E9%9B%84%E8%81%94%E7%9B%9F&dataType=0&pageNo1=1&pageSize1=20&pageNo2=1&pageSize2=20&pageNo3=1&pageSize3=20&online=0&sorttype=0&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d
    public static  String  getAppSearchUrl(String name){
        try {
            name= URLEncoder.encode(name,"utf-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }

        return "http://zhibo.sogou.com/getAppSearchData?type=json&query="+name+"&dataType=0&pageNo1=1&pageSize1=20&pageNo2=1&pageSize2=20&pageNo3=1&pageSize3=20&online=0&sorttype=0&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d";
    }
    //平台大全
    public static  String  platformUrl="http://zhibo.sogou.com/mvc/app/platformconfig.jsp?user_id=-1&os=android&userKey=947a0b53bb7304584fb49c96e3321264aed5ac9d&name=all&system=android&version=3.4.2&appid=947a0b53bb7304584fb49c96e3321264aed5ac9d";

    //电竞头条
    //http://api.live.uuu9.com/Info/getInfoV3.html?gid=2&page=1&cid=11111&sn=20
    //page从1开始
    //详情使用url字段通过webView加载
    public static  String  getNewsUrl(int page){
        return "http://api.live.uuu9.com/Info/getInfoV3.html?gid=2&page="+page+"&cid=11111&sn=20";
    }

}
